<template>
<a-modal
      title="审核结果"
      :visible="visible"
      @ok="handleSave"
      @cancel="handleClose"
    >
    <a-form :form="form" >
      <a-row :gutter="48">
        <a-col :sm="{span:24}" :lg="{span:24}" :xl="{span:24}" >
          <a-form-item label="审核结果">
            <a-select v-decorator="[
                'shjg',
                {
                  rules: [{ required: true, message: '请选择审核结果!' }]
                }
              ]"  :allowClear="true" showSearch optionFilterProp="children" >
                <a-select-option v-for="i in TYPE0371" :key="i.id" :value="i.code" v-if="i.code!=='01'">{{ i.name }}</a-select-option>
              </a-select>
          </a-form-item>
        </a-col>
        <a-col :sm="{span:24}" :lg="{span:24}" :xl="{span:24}">
          <a-form-item label="审核意见">
            <a-textarea v-decorator="['shyj']" placeholder="请输入..." />
          </a-form-item>
        </a-col>
      </a-row>
    </a-form>
    </a-modal>
</template>

<script>
import { mapState } from 'vuex'

export default {
  props: {
    visible: {
      default: false
    }
  },
  data () {
    return {
      form: this.$form.createForm(this),
    }
  },
  computed: {
    ...mapState({
      TYPE0371: state => state.app['TYPE0371'] // 审核结果
    })
  },
  methods: {
    handleSave () {
      this.form.validateFields(
        (err,values) => {
          if (!err) {
            this.$emit('success',values)
          }
        },
      );
    },
    handleClose () {
      this.$emit('close')
    }
  }
}
</script>
